#!/bin/bash

echo "正在检查程序依赖..."

# 检查 PyQt5 是否已安装
if pip3 list | grep -q "PyQt5"; then
    echo "PyQt5 已安装，无需重新安装"
else
    echo "正在安装必要的依赖..."
    ./安装依赖.sh
fi

# 检查安装是否成功
if pip3 list | grep -q "PyQt5"; then
    echo "依赖安装成功，正在启动程序..."
    python3 main.py
else
    echo "依赖安装失败，请检查网络连接或手动安装依赖"
    exit 1
fi
